package com.heartbeats.lab.wiibalanceboard.views
{

import flash.events.Event;
import com.heartbeats.lab.wiibalanceboard.views.ComponentView;

public class CompositeView extends ComponentView
{
	private var aChildren : Array;
	
	public function CompositeView ( aModel : Object, aController : Object = null )
	{
		super ( aModel, aController );
		
		this.aChildren = new Array ();
	}
	
	override public function add ( c : ComponentView ) : void 
	{
		this.aChildren.push ( c );
	}
	
	override public function update ( event : Event = null ) : void 
	{
		for each ( var c : ComponentView in this.aChildren ) 
		{
			c.update ( event );
		}
	}
}

}